/*
 * file name：fal_cfg
 * current version :v1.0.0
 * Change Logs:
 * Date           Author            Main Changes
 * 2018-05-17     armink            the first version
 * 2023-11-20     lanxin            add some notes and add some code
 *
 */

/********************************************** READ ME BEGIN ***********************************************/

/* NOTE:1
 *
 * *1.fal 配置信息。
 *
*/

/*********************************************** READ ME END ************************************************/

#ifndef _fal_cfg_H_
#define _fal_cfg_H_

/* source file */
#include <rtconfig.h>

/* part name */
#define FAL_PART_NAME_BOOT      "boot"
#define FAL_PART_NAME_APP       "app"

/* flash device name */
#define SPI_FLASH_DEV_NAME      "spiflash"//name from spi_flash

/* flash device */
extern struct fal_flash_dev spi_flash;//source from drv_w25qxx.c

/* flash device table */
#define FAL_FLASH_DEV_TABLE         \
    {                               \
        &spi_flash,                 \
    }

/* ====================== Partition Configuration ========================== */
#ifdef FAL_PART_HAS_TABLE_CFG

#define FAL_PART_TABLE                                                                          \
    {                                                                                           \
        /* spi flash */                                                                        \
        {FAL_PART_MAGIC_WORD,   FAL_PART_NAME_BOOT,      SPI_FLASH_DEV_NAME,    1024*0,         256*1024},      \
        {FAL_PART_MAGIC_WORD,   FAL_PART_NAME_APP,       SPI_FLASH_DEV_NAME,    1024*0,         256*1024},      \
    }
#endif /* FAL_PART_HAS_TABLE_CFG */

#endif /* _fal_cfg_H_ */
